	/**
 * Book路由模块  
 * routes/books.js
 */
 
    var express = require("express");
    var router = express.Router();
     
    //导入所需控制器
    const { fetchFromDouban } = require("../controller/fetch");
    const book = require("../controller/book");
     
    //定义路由
    router.get("/fetch/douban/:isbn", fetchFromDouban);

    router.get("/:id", book.find);

    router.get("/", book.findAll);

    router.post("/", book.add);

    router.put("/:id", book.update);

    router.delete("/:id", book.remove);
     
    module.exports = router;